package com.heima.api.item;

import com.heima.common.Result;
import com.heima.dto.DeductStockDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
/**
 * @Auth: zhuan
 * @Desc: 商品服务对外暴露接口
 * @Date: 2023/9/6 9:55
 */
@FeignClient("item-service")
public interface ItemClient {

    @PostMapping("/item/deductStock")
    public Result deductStock(@RequestBody List<DeductStockDTO> dtos);

    @GetMapping("/item/page/{page}/{size}")
    public Result page(@PathVariable(value = "page",required = false)int page,
                       @PathVariable(value = "size",required = false)int size);
}
